package projFn;
import image.Img;

import java.io.IOException;
import java.util.HashMap;

/**
 * @author Ashish Gupta
 * CVSSP, University of Surrey
 * Copyright (c) 2010 Ashish Gupta
 * All rights reserved.
 */
/**
 * 
 */

/**
 * @author Ashish
 *
 */
public class DataSet {
	private HashMap<String,Img> dataSet = new HashMap<String,Img>();

	public DataSet(ImageSet imageSet, String hashCodeFolderName, int numBins) throws IOException{
		int numImages = imageSet.getImageName().size();
		for(int i =0; i< numImages; i++){
			Img img = new Img(numBins);
			img.setImageName(imageSet.getImageName().get(i));
			img.setClassType(imageSet.getClassLabel().get(i));
			img.readHashCodeFile(hashCodeFolderName);
			dataSet.put(imageSet.getImageName().get(i), img);
		}
				
	}
	/**
	 * @param dataSet the dataSet to set
	 */
	public void setDataSet(HashMap<String,Img> dataSet) {
		this.dataSet = dataSet;
	}

	/**
	 * @return the dataSet
	 */
	public HashMap<String,Img> getDataSet() {
		return dataSet;
	}
}
